package com.contactbook.web.server.servlet;

import java.util.Set;


import com.contactbook.web.client.dto.GroupDTO;
import com.contactbook.web.client.service.GroupService;
import com.contactbook.web.server.service.GroupServiceImpl;
import com.google.gwt.user.server.rpc.RemoteServiceServlet;

public class GroupServlet extends RemoteServiceServlet implements GroupService {
	
	private static final long serialVersionUID = 1L;
	
	private GroupService impl = new GroupServiceImpl();
	
	public GroupServlet() {
		super();
	}

	@Override
	public GroupDTO add(GroupDTO groupDTO, String login, String password) {
		
		return impl.add(groupDTO, login, password);
	}

	@Override
	public void delete(int groupId, String login, String password) {
		impl.delete(groupId, login, password);
	}

	@Override
	public GroupDTO getGroupById(int groupId, String login, String password) {
		return impl.getGroupById(groupId, login, password);
	}

	@Override
	public GroupDTO getGroupByName(String name, String login, String password) {
		return impl.getGroupByName(name, login, password);
	}

	@Override
	public Set<GroupDTO> getGroups(String login, String password) {
		return impl.getGroups(login, password);
	}

	@Override
	public boolean isLogged(String login, String password) {
		return impl.isLogged(login, password);
	}

	@Override
	public void login(String login, String password) {
		impl.login(login, password);	
	}

	@Override
	public void logout() {
		impl.logout();
	}

	@Override
	public void update(GroupDTO groupDTO, String login, String password) {
		impl.update(groupDTO, login, password);
	}
}
